package dao;

import org.hibernate.Session;

public final class Conexao {

	public static Session sessao;

	public static Session getConexao() {
		if (sessao == null) {
			sessao = HibernateUtil.getSessionFactory().openSession();
		}
		return sessao;
	}

	public static void close() {
		sessao.close();
	}

}
